package com.zzxy.spring34.service.impl;

import com.zzxy.spring34.dao.IStudentdao;
import com.zzxy.spring34.dao.impl.StudentDaoImpl;
import com.zzxy.spring34.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
    public class StudentServiceImpl implements IStudentService {
    @Autowired
        private IStudentdao studentdao;
        public int updateStudent(int id) {
            System.out.println("update student...");
            int i = 1 / 0;


            return id;
        }

       /* public IStudentdao getStudentdao() {
            return studentdao;
        }

        public void setStudentdao(IStudentdao studentdao) {
            this.studentdao = studentdao;
        }*/

        @Override
        public String toString() {
            return "StudentServiceImpl{" +
                    "studentdao=" + studentdao +
                    '}';
        }

        @Override
        public void addStudent(String username, String password) {
            studentdao.addstudent(username,password);

        }

        public void setStudentDao(StudentDaoImpl studentDao) {
            this.studentdao = studentDao;
        }
    }


